﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace YAMN_Cinemas.Presentation
{
    public partial class Admin_EditScreen1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
          protected void Button1_Click(object sender, EventArgs e)
        {
            using (TheatreEntities te = new TheatreEntities())
            {
                Screen addscreen = new Screen();
                
                addscreen.Screen_Name = txt_ScreenName.Text;
                addscreen.PSeats = 0;
                addscreen.ESeats = Convert.ToInt64(txt_Seats.Text);
                te.AddToScreens(addscreen);
                te.SaveChanges();
               
               
                Response.Redirect("http://localhost:6500/Presentation/Admin_EditScreen1.aspx");
                
                
            }
        }

          protected void btn_Cancel_Click(object sender, EventArgs e)
          {
               Response.Redirect("http://localhost:6500/Presentation/Admin_Home.aspx");
        }
          }
    }

    
